'use strict'

const mongoose = require('mongoose')
const Schema = mongoose.Schema

const Manager = mongoose.model('Manager', new Schema({
  username: String,
  salt: String,
  passwordHash: String,
  phoneNumber: String, // 手机号
  role: Schema.Types.ObjectId, // 角色 -> Role
  firstLoginAt: {type: Date}, // 首次登录日期
  lastLoginAr: {type: Date}, // 最后登录日期
  avatar: String, // 头像`url`
}))

module.exports = Manager